package com.qf.service.impl;

import com.qf.entity.Stu;
import com.qf.entity.StuVO;
import com.qf.mapper.StuMapper;
import com.qf.service.StuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author Qiao
 * @date 2025/8/15
 * @desc
 */
@Service
public class StuServiceImpl implements StuService {

    @Autowired
    private StuMapper stuMapper;
    @Override
    public Stu findById(int id) {
        return stuMapper.findById(id);
    }

    @Override
    public List<Stu> findAll() {
        return stuMapper.findAll();
    }

    @Override
    public List<Stu> search(Map<String, Integer> map) {
        return stuMapper.search(map);
    }

    @Override
    public void add(Stu stu) {
        stuMapper.add(stu);
    }

    @Override
    public boolean edit(Stu stu) {
        return stuMapper.edit(stu);
    }

    @Override
    public boolean deleteById(int id) {
        return stuMapper.deleteById(id);
    }

    @Override
    public void deleteBatch(List<Integer> ids) {
        stuMapper.deleteBatch(ids);
    }

    @Override
    public StuVO findStuVOById(int id) {
        return stuMapper.findStuVOById(id);
    }

    @Override
    public List<StuVO> findStuVOAll() {
        return stuMapper.findStuVOAll();
    }

    @Override
    public List<StuVO> findStudentAndAllSubjectByStuid(int id) {
        return stuMapper.findStudentAndAllSubjectByStuid(id);
    }

    @Override
    public List<StuVO> findStudentAndAllSubjectAndAllTeacherByStuid(int id) {
        return stuMapper.findStudentAndAllSubjectAndAllTeacherByStuid(id);
    }


}
